package com.linkgie.galaxyframework.templating.model.maven;

import java.util.LinkedList;
import java.util.List;

import com.linkgie.galaxyframework.templating.model.FileResource;

/**
 * Maven 项目的 java 资源；
 * 
 * @author huanghaiquan
 *
 */
public class MavenJavaResources {
	
	public static final String DEFAULT_DIRECTORY = "src/main/resources";
	
	/**
	 * Java 资源目录；<p>
	 * 
	 * 通常是 src/main/resources ；
	 */
	private String directory = DEFAULT_DIRECTORY;

	/**
	 * Java 源码文件清单；
	 */
	private List<FileResource> resources = new LinkedList<>();

	public String getDirectory() {
		return directory;
	}

	public void setDirectory(String directory) {
		this.directory = directory;
	}

	public List<FileResource> getResources() {
		return resources;
	}

	public void setResources(List<FileResource> resources) {
		this.resources = new LinkedList<>(resources);
	}

	public void addResources(List<FileResource> resources) {
		this.resources.addAll(resources);
	}
	
	public void addResources(FileResource... resources) {
		for (FileResource fileResource : resources) {
			this.resources.add(fileResource);
		}
	}
	
}
